package uz.edo.error;
import java.util.ResourceBundle;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;

import uz.edo.app.client.Home;
import uz.edo.app.client.Login;

public class MyPageExpired extends WebPage
{
    ResourceBundle bundle=ResourceBundle.getBundle("uz.edo.error.Error");
    public MyPageExpired()
    {
    	Link link;
        if(getSession().isTemporary())
        {
            add(link = new Link("newLink")
            {
				private static final long serialVersionUID=-248278677305270784L;
				public void onClick()
                {
                    setResponsePage(Login.class);
                }
            });
            link.add(new Label("newLinkLabel", bundle.getString("page.login")));
        }else
        {
            add(link = new Link("newLink")
            {
				private static final long serialVersionUID=3262484250268070725L;
				public void onClick()
                {
                    setResponsePage(Home.class);
                }
            });
            link.add(new Label("newLinkLabel", bundle.getString("page.home")));
        }
    }
}